#include <iostream>
#include <string>
#include <algorithm>

std::string GetPositive(int n){
    std::string res = "";

    for(int i=0; i< 32; i++){
        n&1? res += "1": res += "0";
        n >>= 1;
    }

    std::reverse(res.begin(), res.end());

    return res;

}



/**
 * 输出二进制补码
 * 
 */
int main(){
    int n;

    std::cin >> n;

    if (n >= 0){
        std::cout << GetPositive(n);
    }else{
        int m = -n;
        std::string res = GetPositive(m);
        for(int i=0; i< res.size(); i++){
            res[i] == '0'? res[i] = '1': res[i] = '0';
        }
        
        int carry  = 1;

        for(int i=res.size()-1; i>=0; i--){
            int num = res[i] - '0' + carry;
            res[i] = (char)((num) % 2 + '0');
            carry = num / 2;
        }

        std::cout << res;

    }

    return 0;
}